Skip to content

feat(nve-aspect-rose): Ny komponent for utsatte himmelretninger#913

Open
gruble wants to merge 3 commits into
mainfrom
feature/var-591-figur-for-utsatte-himmelretninger
Open

feat(nve-aspect-rose): Ny komponent for utsatte himmelretninger#913
gruble wants to merge 3 commits into
mainfrom
feature/var-591-figur-for-utsatte-himmelretninger

Conversation

@gruble

@gruble gruble commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Denne komponenten trenger vi på ny varsom.no og også i Regobs/Varsom-appen når vi skriver om dette til designsystemet.
Siden varsom.no bruker React og Regobs bruker Angular, ønsker vi å bruke en felles web-komponent for dette.
Her er link til saken for de som har tilgang: https://nveprojects.atlassian.net/browse/VAR-591

Jeg har tatt utgangspunkt i dagens Angular/svg-komponent i Regobs, forenklet koden og gjort den litt mer fleksibel.
Jeg byttet ut skrifttypen med en vi bruker i desigsystemet, ellers har jeg beholdt fargene fra Regobs. Bruker gjerne mer offisielle farger fra Designsystemet, men da hadde det vært kjekt å se skissene i Figma først. Har spurt designerne om dette.

Håper denne komponenten kan få bo i designsystemet inntil vi finner en bedre plass!

@github-actions

Copy link
Copy Markdown
Contributor

Azure Static Web Apps: Your stage site is ready! Visit it here: https://brave-meadow-0c645bd03-913.westeurope.5.azurestaticapps.net

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new shared web component (nve-aspect-rose) to visualize exposed/affected aspects (8 compass sectors) for reuse across React (varsom.no) and Angular (Regobs/Varsom-appen), including docs and unit tests.

Changes:

  • Added nve-aspect-rose Lit web component rendering an SVG “aspect rose” with language and accessibility labeling.
  • Added Vitest/@open-wc tests for rendering, sector states, language labels, and aria-label behavior.
  • Added documentation page and registered the component in the design system exports and component overview.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
src/nve-designsystem.ts Exports the new NveAspectRose component from the library entrypoint.
src/components/nve-aspect-rose/nve-aspect-rose.component.ts Implements the new SVG-based aspect rose component with props for value, lang, and label.
src/components/nve-aspect-rose/nve-aspect-rose.styles.ts Adds base sizing and sector/circle styling for the component.
src/components/nve-aspect-rose/nve-aspect-rose.test.ts Adds unit tests covering defaults, sector rendering/state, language labels, and aria labeling.
doc-site/components/nve-aspect-rose.md Adds the documentation page with usage examples.
doc-site/components/Komponentoversikt.md Registers the new component in the documentation component overview list.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/nve-aspect-rose/nve-aspect-rose.component.ts
Comment thread src/components/nve-aspect-rose/nve-aspect-rose.component.ts
Comment thread src/components/nve-aspect-rose/nve-aspect-rose.component.ts
Comment thread src/components/nve-aspect-rose/nve-aspect-rose.component.ts Outdated
Comment thread src/components/nve-aspect-rose/nve-aspect-rose.component.ts
Comment thread src/components/nve-aspect-rose/nve-aspect-rose.component.ts
Comment thread src/components/nve-aspect-rose/nve-aspect-rose.styles.ts
Comment thread doc-site/components/nve-aspect-rose.md Outdated
Comment thread doc-site/components/nve-aspect-rose.md Outdated
Comment thread doc-site/components/Komponentoversikt.md
@github-actions

Copy link
Copy Markdown
Contributor

Azure Static Web Apps: Your stage site is ready! Visit it here: https://brave-meadow-0c645bd03-913.westeurope.5.azurestaticapps.net

@github-actions

Copy link
Copy Markdown
Contributor

Azure Static Web Apps: Your stage site is ready! Visit it here: https://brave-meadow-0c645bd03-913.westeurope.5.azurestaticapps.net

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants